-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add support for isort option --known-first-party
#10803
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
bd160ae to
070dac1
Compare
--known-first-party
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #10803 +/- ##
=======================================
Coverage 95.98% 95.98%
=======================================
Files 176 176
Lines 19566 19567 +1
=======================================
+ Hits 18781 18782 +1
Misses 785 785
🚀 New features to boost your workflow:
|
DanielNoord
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Pierre-Sassoulas Is this option something we want to add?
This comment has been minimized.
This comment has been minimized.
270b3bd to
710916d
Compare
|
Motivation for me was that we have a project that uses a Rather than doing a large-scale refactoring adding this exception is the easiest way out. It would be even better if PyLint would understand the |
This comment has been minimized.
This comment has been minimized.
710916d to
ceba49f
Compare
|
This will need a rebase, and an opinion from @Pierre-Sassoulas or any other maintainer about whether we want to do this or not |
Pierre-Sassoulas
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still have replacing isort by ruff on my mind but we can probably accommodate both (by adding an optional dependency and putting isort imports behind guards). Let's add isort features if the people want them, I guess ? (How much maintenance can one isort option cost ? 12 $ ?)
Similar to known-third-party this recognizes modules as first party modules.
ceba49f to
3ba7fb8
Compare
|
Rebased |
|
🤖 According to the primer, this change has no effect on the checked open source code. 🤖🎉 This comment was generated for commit 3ba7fb8 |
Type of Changes
Description
Add support for
--known-first-partysimilar to--known-third-party:Force import order to recognize a module as part of a first party library.
Based on #10802 as otherwise tests would fail